package com.example.base.domain.userPack;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.example.base.idGenerator.CustomKeyGenerator;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor(staticName = "of")
@NoArgsConstructor
@TableName(value = "user", autoResultMap = true)
@KeySequence("customKeyGenerator")
public class User {
    @TableId(type = IdType.INPUT)
    private String id;
    private String name;
    private Integer age;
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> role;
    private Sex sex;
    private SexExplain sexExplain;
    @TableLogic(delval = "1",value = "0")
    private Integer delFlag;
}

